namespace OasisCiq.Xnl
{
    using System;
    using System.Linq;

    /// <summary>
    /// A list of organisation name element types, e.g. Name, propriety type, liability type, etc.
    /// </summary>
    public class OrganisationNameElementList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[]
        {
            "NameOnly", // "Sakthisoft" in "Sakthisoft Pty. Ltd". "Pty.Ltd" is the legal entity for the organisation name "Sakthisoft"
            "TypeOnly", // "Pty. Ltd" in Sakthisoft Pty.Ltd, where "Sakthisoft" is the name of the organisation. ""Inc" in ABC Inc, where "ABC" is organisation name
            "FullName" // Full Name of the organisation. e.g. Sakthisoft Pty. Ltd
        };

        public OrganisationNameElementList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}